package com.wj.rpsm.user.service.impl;

import com.wj.rpsm.user.mapper.UserMapper;
import com.wj.rpsm.user.pojo.User;
import com.wj.rpsm.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author WeiJin
 * @version 1.0
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public int updateStatusById(User user) {
        return userMapper.updateStatusById(user);
    }

    @Override
    public User getById(Integer id) {
        return userMapper.getById(id);
    }

    @Override
    public Integer updateInfo(User user) {
        return userMapper.updateInfo(user);
    }

    @Override
    public User login(String account, String password) {
        return userMapper.login(account,password);
    }

    @Override
    public User getUserByAccount(String account) {
        return userMapper.getUserByAccount(account);
    }
}
